#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
#define rep(i, a, b) for (int i = (a); i <= (b); i++)
#define per(i, a, b) for (int i = (a); i >= (b); i--)
#define endl '\n'
const int N = 105;

int n, m;
int x[N], y[N];
int w[N][N];

int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  cin >> n >> m;
  rep(i, 1, n) cin >> x[i] >> y[i];
  rep(i, 1, m) rep(j, 1, n) w[i][j] = x[j] * (y[j] + i);
  rep(i, 1, m) cout << *max_element(w[i] + 1, w[i] + n + 1) << endl;
  return 0;
}